import Mock from "mockjs";

// 定义数据类型
let data = Mock.mock(
  {
    status: 0,
    "result|40": [
      {
        style:
          "https://pic3.zhimg.com/80/v2-f3a2cebdedb06ab8d56eca59bc52fdd1_720w.jpg",
        date: "@ctitle(10,20)",
        "_id|+1": 1200001,
        currentData: "@datetime()",
        "goodsSale|30-500": 30,
        "filestyle|1": ["doc", "video","png"],
        "fen|1-5": "★",
        address: "@ctitle",
        size: "@integer(1,20)",
      },
    ],
  }
);
class FilesService {
  getDate() {
    return Promise.resolve({
      data,
    });
  }
  delete(id) {
    data.data = data.data.filter((item) => item.goodsId !== id);
    return Promise.resolve(true);
  }
}

const service = new FilesService();
export default service;
